/*
 * @Author: 周鹏飞
 * @Date: 2021-06-04 16:51:06
 * @LastEditors: 周鹏飞
 * @LastEditTime: 2021-07-05 10:34:38
 * @Description: file content
 */
rightTwo = {
  title: {
    text: "上下站车流量",
    padding: [27, 0, 0, 45],
    textStyle: {
      color: "#fff",
      fontSize: 18,
      fontWeight: "normal"
    },

  },
  grid: {
    left: "15%",
    top: "40%"
  },
  legend: {
    itemGap: 50,
    textStyle: {
      color: '#ffffff'//字体颜色
    },
    top: '80',
    left: '40',
    itemStyle: {
      color: ['#2deedb', '#ffad41']
    }
  },
  tooltip: {},
  dataset: {
    source: [
      ['product', '上站车流量', '下站车流量'],
      ['内乡西站', 43.3, 85.8],
      ['师岗站', 83.1, 73.4],
      ['龙堰站', 86.4, 65.2],
      ['陶营站', 72.4, 53.9],
      ['厚坡服务区', 72.4, 53.9],
      ['aaaaaa', 72.4, 53.9],
    ]
  },
  xAxis: {
    type: 'category',
    axisLabel: {
      interval: 0,
      textStyle: {
        color: '#ffffff'
      },
      axisLine: {       //x轴刻度线
        show: false
      },
    },

  },
  yAxis: {
    type: 'value',
    axisLabel: {
      show: true,
      textStyle: {
        color: '#ffffff'
      },

    },
    axisLine: {       //y轴刻度线
      show: false
    },
    splitLine: {
      lineStyle: {
        color: '#305f89'
      }    //网格线
    }
  },

  series: [
    {
      type: 'bar',
      color: '#00efff',
      itemStyle: {
        normal: {//写上normal属性，否则不起作用；
          barBorderRadius: [15, 15, 0, 0],
          color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
            offset: 0,
            color: "#194967" // 0% 处的颜色
          }, {
            offset: 0.6,
            color: "#2c789c" // 60% 处的颜色
          }, {
            offset: 1,
            color: "#3eadd4" // 100% 处的颜色
          }], false)
        }
      }
    },
    {
      type: 'bar',
      color: '#f3bc43',
      itemStyle: {
        normal: {//写上normal属性，否则不起作用；
          barBorderRadius: [15, 15, 0, 0],
          color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
            offset: 0,
            color: "#314b54" // 0% 处的颜色
          }, {
            offset: 0.6,
            color: "#b38946" // 60% 处的颜色
          }, {
            offset: 1,
            color: "#efa341" // 100% 处的颜色
          }], false)
        }
      }

    }
  ]
};
// function getCarStation() {
//   var myChart3 = echarts.init(document.getElementById('Eright_two'));
//   $.ajax({
//     type: 'post',
//     url: httpUrl + 'statistics/statistics/travelingCount',
//     data: "",
//     dataType: 'json',
//     contentType: "application/json",
//     headers: {
//       Authorization: localStorage.getItem('token')
//     },
//     success: function (res) {
//       console.log(res);
//       rightTwo.dataset.source = res.data
//       myChart3.setOption(rightTwo)

//     },
//     error: function (err) {
//       vm.$message({
//         message: '查询失败请稍后再试',
//         type: 'warning'
//       });
//     }
//   })
// }
// 假接口
function getCarStationJia(){
  var myChart3 = echarts.init(document.getElementById('Eright_two')); 
  $.ajax({
    type: 'get',
    url: httpUrl + 'event/eventProvisionalStatistics/getProvisionStatistics/113',
    data: "",
    dataType: 'json',
    contentType: "application/json",
    headers: {
      Authorization: localStorage.getItem('token')
    },
    success: function (res) {

      rightTwo.dataset.source = res.data.content
      myChart3.setOption(rightTwo)
    },
    error: function (err) {
      vm.$message({
        message: '查询失败请稍后再试,或与管理员联系',
        type: 'error'
      });
    }
  })
}